package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 工单
 * </p>
 *
 * @author long
 * @since 2025-01-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_work_order")
public class WorkOrderDo extends Model<WorkOrderDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "tenant_id",fill = FieldFill.INSERT)
    private Long tenantId;

    @TableField("has_attach")
    private Integer hasAttach;


    /**
     * 仓库id
     */
    @TableField("wh_id")
    private Long whId;

    /**
     * 客户id
     */
    @TableField(value = "company_id", fill = FieldFill.INSERT)
    private Long companyId;

    /**
     * 工单号
     */
    @TableField("work_no")
    private String workNo;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 工单类型
     */
    @TableField("type")
    private String type;

    /**
     * 紧急程度
     */
    @TableField("urgency")
    private Integer urgency;

    /**
     * 待定
     */
    @TableField("sku")
    private String sku;

    /**
     * 附件id
     */
    @TableField("file_ids")
    private String fileIds;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 状态
     */
    @TableField("status")
    private Integer status;

    /**
     * 结算 false未结算 true已结算
     */
    @TableField("settle_flag")
    private Boolean settleFlag;

    /**
     * 接收方 false仓库 true客户
     */
    @TableField("customer_reception")
    private Boolean customerReception;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 完成时间
     */
    @TableField("finish_time")
    private Date finishTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
